﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Traceability_2203.Common.Infrastructure.interFaces
{
    /// <summary>
    /// 基类仓储接口
    /// </summary>
    /// <typeparam name="T">占位符</typeparam>
    public interface IBaseRepository<T>where T : class,new()
    {

        /// <summary>
        /// 获取所有的数据
        /// </summary>
        /// <returns>获取所有的数据</returns>
          Task<IQueryable<T>> GetAll();

        /// <summary>
        /// 新增
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>

        Task<int> Add(T t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>



        Task<int> update(T t);

    }



}
